<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>小说章节管理</title>
<link href="../member/templets/style/base.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="../images/js/j.js"></script>
<script language="javascript" type="text/javascript" src="../member/templets/js/table_function.js"></script>
<script language="javascript" type="text/javascript" src="js/main.js"></script>
<script language="javascript" type="text/javascript" src="js/story.js"></script>
<script language="javascript" type="text/javascript">
<!--
	$(function(){
		$("#selectall").click(function(){
			$(this).attr("checked") ? $("input[name='ids[]']").attr("checked","checked") :  $("input[name='ids[]']").attr("checked","");
		});
	});
	function DelStoryChapter(){
		if(window.confirm("删除章节会删除章节下的所有内容，你确实要删除么？")){
			$("input[name='action']").attr("value","delstorychapter");
			$("form[name='form2']").submit();
		}
	}
-->
</script>
</head>
<body>
<div id="main">
  <?php include(DEDEMEMBER."../templets/head.htm"); ?>
  <div id="content" class="w960 clearfix">
    <?php include(DEDEMEMBER."./templets/menu.php"); ?>
    <div id="mcpmain">
      <div id="appTab">
        <ul>
          <li class="thisTab"><a href="mybooks.php"><span>连载书目</span></a></li>
          <li><a href="story_list_content.php"><span>连载内容</span></a></li>
        </ul>
      </div>
      <ul class="tabSub">
        <li <?php echo ($arcrank=='')? "class='thisTab'" : "";?>><?php if($booktype == '1'){?>
              <a href='story_add_photo.php?bookid=<?php echo $bookid; ?>'><span>新增连载</span></a>
              <?php }else{?>
              <a href='story_add_content.php?bookid=<?php echo $bookid; ?>'><span>新增连载</span></a>
              <?php }?></li>
        <li <?php echo ($arcrank=='1')? "class='thisTab'" : "";?>><a href="story_list_content.php?bookid=<?php echo $bookid; ?>"><span>小说内容</span></a></li>
        <li <?php echo ($arcrank=='-1')? "class='thisTab'" : "";?>><a href="story_list_chapter.php?bookid=<?php echo $bookid; ?>"><span>书目章节</span></a></li>
        <li <?php echo ($arcrank=='-2')? "class='thisTab'" : "";?>><a href="story_edit.php?bookid=<?php echo $bookid; ?>"><span>书目资料</span></a></li>
      </ul>
      <div id="mainCp">
      <h3 class="meTitle"><strong>&nbsp;书目章节</strong></h3>  
        <form class="mL10 mR10 mTB10" name="form2" action="story_do.php" method="post">
          <input type="hidden" name="action" value="upChapterSort" />
          <table cellspacing="1" class="list" width="100%">
            <thead>
              <tr>
                <th width="1%" ><input name="checkedClick" type="checkbox" value="" id="checkedClick"></th>
                <th width="15%">隶属图书</th>
                <th >章节名称 </th>
                <th width="10%">内容</th>
                <th width="5%">章节序号 </th>
              </tr>
            </thead>
            <tbody>
            
            {dede:datalist}
            <tr>
              <td><input type="checkbox" name="ids[]" id="ids<?php  echo $fields['id'];  ?>" value="<?php  echo $fields['id'];?>" /></td>
              <td align="center"><?php echo "<a href='story_list_content.php?bookid={$fields['bookid']}'>".$fields['bookname']."</a>"; ?></td>
              <td><input class="text" type="text" name="chaptername_<?php echo $fields['id']; ?>" value="<?php echo $fields['chaptername']; ?>" size="25" />
              </td>
              <td align="center"><a href='story_list_content.php?chapid=<?php echo $fields['id']; ?>&bookid=<?php echo $fields['bookid']; ?>'>浏览</a> (<?php echo $fields['postnum'];?>)</td>
              <td><input class="text" style="width:30px" type="text" name="chapnum_<?php echo $fields['id'];?>" value="<?php echo $fields['chapnum']; ?>" size="3" /></td>
            </tr>
            {/dede:datalist}
            </tbody>
            
            <tfoot>
              <tr>
                <td colspan="6"><div>
                    <div class="fLeft mTB10">
                      <button class="button5" type="submit">批量编辑</button>
                      <button class="button2 mL10" type="button" onclick="DelStoryChapter()">删除</button>
                    </div>
                    <div class="pages mTB10 fRight">{dede:pagelist listsize=5/}</div>
                  </div>
                  <div class="clear"> </div></td>
              </tr>
            </tfoot>
          </table>
        </form>
        </div>
        <!--主操作区域 -->
      </div>
 <div class="clear"></div>
    </div>
  </div>
<?php include(DEDEMEMBER."./templets/foot.htm"); ?>
</div>
</body>
</html>

